package com.dgut.courses_selecting_sys.service;

import com.dgut.courses_selecting_sys.entity.Activities;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dgut.courses_selecting_sys.entity.AjaxResult;
import com.dgut.courses_selecting_sys.dto.ActivitiesDto;
import com.dgut.courses_selecting_sys.entity.Course;
import com.dgut.courses_selecting_sys.entity.User;
import com.dgut.courses_selecting_sys.utils.ShiroUtils;
import com.dgut.courses_selecting_sys.vo.ActivityRespVo;
import com.dgut.courses_selecting_sys.vo.ActivityVo;
import com.dgut.courses_selecting_sys.vo.PageVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yuec
 * @since 2021-01-26
 */
public interface IActivitiesService extends IService<Activities> {
    /**
     * 创建课程
     * @param activities
     * @return
     */
    AjaxResult createActivity(ActivitiesDto activities);

    /**
     * 编辑课程
     * @param activities
     * @return
     */
    AjaxResult editActivity(Activities activities);

    /**
     * 根据条件搜索课程
     * @param activityVo
     * @return
     */
    PageVo<Activities> getDataByActivityVo(ActivityVo activityVo);

    /**
     * 列出用户的活动列表
     * @return
     */
    List<Activities> listActivities();

    /**
     * 列出被用户选择的活动
     * @param user
     * @return
     */
    List checkUserActivitiesForChoose(User user);

    /**
     * 报选活动
     * @param userId
     * @param activityId
     */
    AjaxResult chooseActivity(Long userId,Long activityId);

    /**
     * 推选活动
     * @param userId
     * @param activityId
     * @return
     */
    AjaxResult unChooseActivity(Long userId, Long activityId);

}
